AITranslate\AI_Translate_Core D

Total Complexity 547
Dependencies 7
Dependents 16
Total lines 3,574
Lines of code 2,121
Logical lines of code 1,235
Comment lines 1,009
Methods 81
Properties 11

Methods 81

Method Rating Maintainability Complexity Lines of code
translate_text()
D
21
51 193
batch_translate_items()
D
28
41 109
get_current_language()
C
34 31 80
validate_api_settings()
B
38 23 61
translate_menu_items()
B
40 23 59
get_homepage_content()
B
38 21 67
translate_url()
B
40 21 51
get_translated_slug()
B
34 16 104
reverse_translate_slug()
B
34 15 117
add_alternate_hreflang_links()
B
39 17 61
add_simple_meta_description()
B
39 16 62
parse_translated_request()
B
42 17 46
translate_template_part()
A
45 14 37
make_api_request()
A
38 10 68
get_cache_statistics()
A
44 9 48
display_language_switcher()
A
44 9 46
save_to_cache()
A
46 9 41
handle_404_redirect()
A
52 10 23
initialize_cache_directories()
A
50 9 34
generate_website_context_suggestion()
A
43 8 48
translate_url_slugs()
A
49 9 31
clear_cache_for_language()
A
50 9 26
remove_marker_from_jetpack_og_tags()
A
51 9 26
translate_post_content()
A
52 8 24
identify_post_from_url()
A
46 7 38
generate_cache_key()
S
55 7 20
cleanup_expired_cache()
S
58 7 16
clear_transient_cache()
S
48 5 35
build_translation_prompt()
S
49 5 29
filter_fluentform_shortcode_output()
S
53 5 23
get_assets_dir()
S
59 5 15
do_translate()
S
49 4 30
translate_widget_title()
S
57 5 15
translate_path_segments()
S
52 4 25
filter_post_type_permalink()
S
54 4 21
validate_settings()
S
62 4 11
translate_terms()
S
62 4 11
clear_menu_cache()
S
55 3 21
get_available_languages()
S
49 2 31
get_cached_content()
S
63 4 10
clear_translation_cache()
S
64 4 10
restore_excluded_shortcodes()
S
60 3 13
restore_shortcode_pairs()
S
60 3 13
extract_shortcode_pairs()
S
57 2 17
get_detectable_languages()
S
70 3 6
remove_translation_marker()
S
69 3 6
remove_marker_from_bloginfo()
S
70 3 6
conditionally_add_fluentform_filter()
S
71 3 5
init()
S
59 2 14
clear_memory_and_transients()
S
56 1 21
get_api_providers()
S
57 1 19
get_instance()
S
71 2 6
schedule_cleanup()
S
73 2 5
get_default_settings()
S
57 1 15
get_settings()
S
68 2 7
get_api_url_for_provider()
S
65 2 8
is_cache_expired()
S
64 2 10
clear_slug_cache_for_language()
S
63 2 10
needs_translation()
S
75 2 4
translate_navigation()
S
65 2 9
clear_slug_cache_for_post()
S
63 2 10
get_always_excluded_shortcodes()
S
63 1 13
__construct()
S
60 1 12
get_cache_dir()
S
74 1 4
get_language_name()
S
75 1 4
translate_site_title()
S
78 1 3
translate_tagline()
S
78 1 3
log_event()
S
71 1 5
clear_slug_cache_table()
S
72 1 5
clear_all_cache()
S
73 1 6
set_current_language()
S
81 1 3
hook_display_language_switcher()
S
82 1 3
strip_all_shortcodes_for_cache()
S
75 1 4
clean_html_string()
S
67 1 7
text_to_slug()
S
80 1 3
get_all_memory_cache()
S
80 1 3
is_in_memory_cache()
S
78 1 3
get_from_memory_cache()
S
78 1 3
set_in_memory_cache()
S
79 1 3
clear_prompt_cache()
S
77 1 4
debug_prompt_with_context()
S
79 1 3